Program transformations for optimization of parsing algorithms and other weighted logic programs
نویسنده
چکیده
Dynamic programming algorithms in statistical natural language processing can be easily described as weighted logic programs. We give a notation and semantics for such programs. We then describe several source-to-source transformations that affect a program’s efficiency, primarily by rearranging computations for better reuse or by changing the search strategy. We present practical examples of using these transformations, mainly to optimize context-free parsing algorithms, and we formalize them for use with new weighted logic programs. Specifically, we define weighted versions of the folding and unfolding transformations, whose unweighted versions are used in the logic programming and deductive database communities. We then present a novel transformation called speculation—a powerful generalization of folding that is motivated by gap-passing in categorial grammar. Finally, we give a simpler and more powerful formulation of the magic templates transformation.1
منابع مشابه
Estimating the Computational Cost of Logic Programs
Information about the computational cost of programs is potentially useful for a variety of purposes, including selecting among diierent algorithms , guiding program transformations, in granularity control and mapping decisions in parallelizing compilers, and query optimization in deductive databases. Cost analysis of logic programs is complicated by nondeterminism: on the one hand, procedures ...
متن کاملA Logic for Correlating Temporal Properties across Program Transformations
Program transformations are widely used in synthesis, optimization, and maintenance of software. Correctness of program transformations depends on preservation of some important properties of the input program. By regarding programs as Kripke structures, many interesting properties of programs can be expressed in temporal logics. In temporal logic, a formula is interpreted on a single program. ...
متن کاملFast and Precise Regular Approximations of Logic Programs
A practical procedure for computing a regular approximation of a logic program is given. Regular approximations are useful in a variety of tasks in debugging, program specialisation and compile-time optimisation. The algorithm shown here incorporates optimisations taken from deductive database fixpoint algorithms and efficient bottom-up abstract interpretation techniques. Frameworks for definin...
متن کاملTransformation Systems and Nondeclarative Properties
Program transformation systems are applied both in program synthesis and in program optimization. For logic programs the “logic” component makes transformations very natural and easy to be studied formally. But, when we move to Prolog programs, the “control” component cannot be ignored. In particular we need to cope with termination properties which are essential for ensuring the reachability o...
متن کاملTransformation Systems and
Program transformation systems are applied both in program synthesis and in program optimization. For logic programs the \logic" component makes transformations very natural and easy to be studied formally. But, when we move to Prolog programs, the \control" component cannot be ignored. In particular we need to cope with termination properties which are essential for ensuring the reachability o...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2007